﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Common.Infrastructure
{
    public class ApiOrderPageParam : ApiParam
    {
        public ApiOrderPageParam()
        {
        }

        public ApiOrderPageParam(int pageIndex, int pageSize)
        {
            if (pageIndex >= 1)
            {
                this.StartIndex = (pageIndex - 1) * pageSize;
            }

            this.PageIndex = pageIndex;
            this.PageSize = pageSize;
        }

        public int PageIndex { get; set; }

        public int StartIndex { get; set; }

        public int PageSize { get; set; }
    }
}
